]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
test-theme: Force default resolution
authorFlorian Müllner <fmuellner@gnome.org>
Tue, 26 Feb 2019 01:13:43 +0000 (02:13 +0100)
committerGeorges Basile Stavracas Neto <georges.stavracas@gmail.com>
Mon, 4 Mar 2019 20:10:07 +0000 (20:10 +0000)
Clutter no longer hard-codes a resolution of 96 DPI (although that's
still the default), so any assertions of sizes for physical units
may be off.

Fix this by setting up the test environment according to the
assumptions.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/419

src/st/test-theme.c

index a6fc9a5f5fa030ef628414a0364be5e93bf91e3f..2548ca2038ccca25d2accdb9d7092190c39c817e 100644 (file)
@@ -542,6 +542,9 @@ main (int argc, char **argv)
   if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
     return 1;
 
+  /* Make sure our assumptions about resolution are correct */
+  g_object_set (clutter_settings_get_default (), "font-dpi", -1, NULL);
+
   file = g_file_new_for_path ("st/test-theme.css");
   theme = st_theme_new (file, NULL, NULL);
   g_object_unref (file);